home *** CD-ROM | disk | FTP | other *** search
/ DOpus Plus / DOpus Plus.iso / Tutorial / C Guide / Time_module / includes / Clock.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-09-20  |  2.2 KB  |  122 lines

  1.  
  2. #include "includes/Project.h"
  3. #include <datatypes/soundclass.h>
  4.  
  5.  
  6. typedef struct
  7. {
  8.     struct IBox           ibox;   
  9.     struct TextAttr       txtattr;   
  10.     char                  fontname[32];
  11.     char                  picture[256];
  12.     
  13.     ULONG                 a4;
  14.     struct Library       *library;
  15.     struct Library       *module;
  16.     IPCData              *ipc;
  17.                 
  18.     struct FontRequester *freq;
  19.         
  20.     struct Screen        *screen;
  21.     struct PubScreenNode *pubscr;
  22.     struct DrawInfo      *discr;
  23.  
  24.     struct TextFont  *txtfont;
  25.     struct IntuiText itext[3];
  26.     char   ibuffer[3][16];
  27.     
  28.     struct Window   *win;
  29.     struct Window   *req;
  30.     struct Gadget   *gad;
  31.     
  32.     ULONG signals;
  33.     
  34.     struct BitMap       *bm;
  35.     struct BitMap       *oldbm;
  36.     
  37.     Object              *obj;
  38.     struct BitMap       *sourcebm;
  39.     struct BitMapHeader *sourcebmhead;
  40.     struct BitScaleArgs  bsa;
  41.           
  42.     struct IntuiMessage *inmsg;
  43.     struct IntuiMessage  imsg;
  44.     
  45.     PopUpMenu  popmenu;
  46.     PopUpItem *popitem;
  47.     struct MinList submenu;
  48.     struct MinList subtime;
  49.        
  50.     ULONG flags;
  51.     
  52.     struct EasyStruct es;
  53.     
  54.     LONG running;
  55.     ULONG hour;
  56.     ULONG minute;
  57.     
  58.     ULONG day;
  59.           
  60.     APTR notify;
  61.     struct MsgPort *notify_port; 
  62.     DOpusNotify *nmsg;
  63.     
  64.     TimerHandle *th;
  65.     
  66.     struct DateStamp date;
  67.     
  68.     struct DateTime dt;
  69.     IPCMessage *ipcmsg;
  70.     
  71.     char buffer [32];
  72.     char woday  [16];
  73.     
  74.     Object *sound;
  75.     Object *alarm;
  76.     
  77.     NewConfigWindow ncfg;
  78.     struct Window *time_req;
  79.     ObjectList *olist;
  80.     UBYTE h;
  81.     UBYTE min;
  82. }   ClockData;
  83.  
  84.  
  85. enum
  86. {
  87.    POPID_CHANGE_BACK,
  88.    POPID_CHANGE_FONT,
  89.    POPID_SOUND,
  90.    POPID_BORDER,
  91.    POPID_AUTOSTART,
  92.    POPID_ALARM,
  93.    POPID_FIX_IT,  
  94.    POPID_CLOSE,
  95.    POPID_ABOUT,
  96.    POPID_PLAIN = 20,
  97.    POPID_TRANSPARENT,
  98.    POPID_PICTURE,
  99.    POPID_ALARMSET = 60,
  100.    POPID_ALARMONOFF
  101. };
  102.  
  103.  
  104. #define DEFAULT_LEFT_EDGE 40
  105. #define DEFAULT_TOP_EDGE  20
  106.      
  107.  
  108. #include <libraries/gadtools.h>
  109. #include <intuition/gadgetclass.h>
  110.  
  111. // a lazyness define (and more readable...)
  112. #define GET_ID(a)   (((struct Gadget *)(a->IAddress))->GadgetID)  
  113.  
  114.  
  115.  
  116.       
  117.  
  118.  
  119.  
  120.  
  121.         
  122.